package com.project.class4_11.model.prototype;

public class Test {
    public static void main(String[] args) {
//        Man man = new Man("张三",23,"宝马");
//        Man m1 = man.clone();
//        System.out.println(man);
//        System.out.println(m1);
//        System.out.println(m1 == man);
//        System.out.println(m1.getCar() == man.getCar());

        Man man = new Man("张三",23,"宝马");
        Man m1 = man.deepClone();
        System.out.println(m1 == man);
        System.out.println(m1.getCar() == man.getCar());
    }
}
